<?php
namespace Library;

use MysqliDb;
use Hoa\Registry\Registry;


/**
* Db
*/
class Db extends MysqliDb {
	/**
	 * 构造函数
	 * 依赖外部传入参数，用于实例化Db数据库类
	 * @param array $dbConf
	 */
	public function __construct($dbConf = null) {
		if (is_null($dbConf)) {
			$conf = Registry::get('conf');
			$dbConf = $conf['database']['default'];
		}
		$dbConf['db'] = $dbConf['database'];
		parent::__construct($dbConf);
	}

}